/**
 * @author LYJ
 * Created by Administrator on 2018/3/8 0008.
 */
function FormModal($modal) {
    var This = this;
    this.$modal = $modal;

    $(function () {
        This.init();
    });

    this.init = function () {
        this.$modal.modal({backdrop:true,show:false});
    };

    this.setData = function (formData) {
        
    };

    this.clearData = function () {

    };


    this.show = function () {
        this.event.showBefore();
        This.$modal.modal("show");
        this.event.showAfter();
    };

    this.hide = function () {
        this.event.hideBefore();
        this.$modal.modal("hide");
        this.event.hideAfter();
    };

    this.class = function (className) {
        return this.$modal.find("."+className);
    };

    this.event = {
        showBefore: function () {},
        showAfter: function () {},
        hideBefore: function () {},
        hideAfter: function () {}
    }
}